load("//bazel:fuzz_testing.bzl", "rust_fuzz_test_binary", "rust_fuzz_test_binary_afl")

package(default_visibility = ["//visibility:private"])

rust_fuzz_test_binary(
    name = "decode_canister_http_request_args",
    srcs = ["fuzz_targets/decode_canister_http_request_args.rs"],
    deps = [
        # Keep sorted.
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:libfuzzer-sys",
    ],
)

rust_fuzz_test_binary(
    name = "decode_ecdsa_public_key_args",
    srcs = ["fuzz_targets/decode_ecdsa_public_key_args.rs"],
    deps = [
        # Keep sorted.
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:libfuzzer-sys",
    ],
)

rust_fuzz_test_binary(
    name = "decode_install_code_args_libfuzzer",
    srcs = ["fuzz_targets/decode_install_code_args.rs"],
    crate_root = "fuzz_targets/decode_install_code_args.rs",
    deps = [
        # Keep sorted.
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:libfuzzer-sys",
    ],
)

rust_fuzz_test_binary_afl(
    name = "decode_install_code_args_afl",
    srcs = ["fuzz_targets/decode_install_code_args.rs"],
    crate_root = "fuzz_targets/decode_install_code_args.rs",
    deps = [
        # Keep sorted.
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:libfuzzer-sys",
    ],
)

rust_fuzz_test_binary(
    name = "decode_sign_with_ecdsa_args",
    srcs = ["fuzz_targets/decode_sign_with_ecdsa_args.rs"],
    deps = [
        # Keep sorted.
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:libfuzzer-sys",
    ],
)
